﻿<navigation:Page x:Class="Behavior.Home" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480" Title="主页" Style="{StaticResource PageStyle}">

    <Grid x:Name="LayoutRoot">
        <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}">

            <StackPanel x:Name="ContentStackPanel"
                        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
	                    xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" 
                        xmlns:localBehavior="clr-namespace:Behavior" 
                        >
                <Grid Background="Brown"  Height="300">
                    
                        <i:Interaction.Behaviors>
                            <localBehavior:BehaviorWithCommand>

                            </localBehavior:BehaviorWithCommand>
                        </i:Interaction.Behaviors>
                    
                </Grid>
                <Grid Background="BlanchedAlmond"  Height="175" Width="516">
                    <Image Stretch="Fill"  Source="/Images/flag-cyan-24x24.png" >
                        <i:Interaction.Behaviors>
                            <localBehavior:放大镜>

                            </localBehavior:放大镜>
                        </i:Interaction.Behaviors>
                    </Image>
                </Grid>

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="292" />
                        <ColumnDefinition Width="348" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="触发器"  Grid.Column="1" />
                    <Image x:Name="imgToFlip" Stretch="Fill" 
                           Source="/Images/Image4.jpg"/> 
                    <Button Content="TurnImage" FontSize="14" Width="100" Margin="0,5,0,-12"  >
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="Click">
                                <localBehavior:触发器 TargetName="imgToFlip"/>
                            </i:EventTrigger>
                        </i:Interaction.Triggers> 
                        <i:Interaction.Behaviors>
                            <localBehavior:BehaviorWithCommand></localBehavior:BehaviorWithCommand>
                        </i:Interaction.Behaviors>
                    </Button>
                </Grid>


            </StackPanel>

        </ScrollViewer>
    </Grid>

</navigation:Page>
